import request from '@/utils/request'

const baseUrl = '/admin/api/v1/audit'

// ==================== 笔记审核 ====================
/**
 * 获取待审核笔记列表
 */
export const getPendingNotes = (page = 1, size = 10) => {
  return request.get(`${baseUrl}/notes`, { params: { page, size } })
}

/**
 * 审核笔记（通过/拒绝）
 */
export const auditNote = (id, data) => {
  return request.put(`${baseUrl}/notes/${id}`, data)
}

// ==================== 书评审核 ====================
/**
 * 获取待审核书评列表
 */
export const getPendingReviews = (page = 1, size = 10) => {
  return request.get(`${baseUrl}/reviews`, { params: { page, size } })
}

/**
 * 审核书评（通过/拒绝）
 */
export const auditReview = (id, data) => {
  return request.put(`${baseUrl}/reviews/${id}`, data)
}

